Traditionally, when a webpage opens, the HyperText Markup Language (HTML) for the webpage contains uniform resource locators (URLs) that point to a path for each image. However, in some cases, browsers may be used for editing, creating, and viewing images using a web application that requires images to be dynamically generated by a server during a session, e.g., web applications such as, but not limited to, PowerPoint® or other graphics-intensive programs. For applications that use dynamically generated images, these URLs cannot exist in the initial HTML because the images do not yet have locations to fetch from. Instead, these web applications must first send a request to the server to get a location for each image. Upon receipt of the request, the web application server renders each image, stores the rendered images in a server cache, and generates a URL for retrieving each image from the server cache. The web application server then returns the URL for retrieving each requested image in a response to the browser. Upon receipt, the web application client adds the URL for each image to the document object model (DOM) in the proper location. Thereafter, the browser uses these URLs as the locations from which to fetch each image for display on the webpage. Specifically, upon receiving an image request from the browser referencing a URL, the web application server returns the requested image in a response as a .jpeg (Joint Photographic Experts Group), .png (Portable Network Graphics), .gif (Graphics Interchange Format), BMP (bitmap), or any other appropriate image file format to the browser. The browser thereafter displays the webpage with the requested image.
In some cases, for instance when a user returns to a page or slide of the web application that was previously viewed and has not been edited, the web application client may retrieve the URLs for the previously requested images from the content data model (or DOM). Moreover, the browser may have stored the image files for the previously requested images in a browser cache. If so, the browser may display the previously requested images without forwarding a request to the web application server.
Traditionally, as described above, because the URL for retrieving an image was generated by the web application server, the web application client was required to obtain the URL before it could request and display an image. That is, the first time an image was displayed on the browser, at least two requests to the web application server were required: a first request to obtain the URL for the image and a second request referencing the URL to fetch the image for display. Accordingly, traditional methods may demonstrate inefficiencies in rendering and displaying images on a browser.
It is with respect to these and other general considerations that embodiments have been made. Also, although relatively specific problems have been discussed, it should be understood that the embodiments should not be limited to solving the specific problems identified in the background.